#cmake file for libb64
#author:guyadong
#created:2016/03/31
cmake_minimum_required( VERSION 2.6 )
set(libb64_flolder ${CMAKE_CURRENT_LIST_DIR}/libb64-1.2.1)
set(INCLUDE_B64 ${libb64_flolder}/include CACHE INTERNAL "libb64 include" )
set(source_b64 ${libb64_flolder}/src)
message(STATUS "INCLUDE_B64=${INCLUDE_B64}")
include_directories(${INCLUDE_B64})
add_library( b64 STATIC ${source_b64}/cdecode.c ${source_b64}/cencode.c )
if(MSVC)
	# MSVC编译b64时关闭C4244 warning
	set_property(TARGET  b64
						APPEND_STRING 
						PROPERTY COMPILE_FLAGS  "/wd4244")
	message(STATUS "add optional:/wd4244 for b64")
endif(MSVC)
